package org.example.juc.singleton;

/**
 * 懒汉式线程单例
 */
public class SingletonTest2 {

    static class LazyHolder {
        public static final SingletonTest2 INSTANCE = new SingletonTest2();
    }

    private SingletonTest2() {

    }

    public static SingletonTest2 getInstance() {
        return LazyHolder.INSTANCE;
    }

    public static void main(String[] args) {

    }
}
